﻿<%@ Page Language="C#" MasterPageFile="~/Template.master" AutoEventWireup="true" CodeFile="InternalAccountPayment.aspx.cs" Inherits="rpt_InternalInvoicePayment" Title="Ghasam | Print Invoice" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<%@ Register Assembly="CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
    Namespace="CrystalDecisions.Web" TagPrefix="CR" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ScriptManager id="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
    </CR:CrystalReportSource>
    <asp:SqlDataSource ID="sdsSalesPerson" runat="server" ConnectionString="<%$ ConnectionStrings:GhasamConnectionString %>"
        SelectCommand="SELECT [ID], ([FirstName] + ' ' + [LastName]) As FullName FROM [SalesPersons]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="sdsItem" runat="server" ConnectionString="<%$ ConnectionStrings:GhasamConnectionString %>"
        SelectCommand="SELECT [ID], [ItemName] FROM [Items]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="sdsInternalAccounts" runat="server" ConnectionString="<%$ ConnectionStrings:GhasamConnectionString %>"
        SelectCommand="SELECT [AccountName], [ID] FROM [InternalAccounts]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="sdsType" runat="server" ConnectionString="<%$ ConnectionStrings:GhasamConnectionString %>"
        SelectCommand="SELECT [ID], [Description] FROM [InternalAccountingType]"></asp:SqlDataSource>
    <table style="width: 100%">
        <tr>
            <td>
                <asp:Label ID="Label1" runat="server" Text="نام کالا"></asp:Label></td>
            <td>
                <asp:DropDownList ID="ddlItemName" runat="server" Width="196px" DataSourceID="sdsItem" DataTextField="ItemName" DataValueField="ID" OnDataBound="ddlItemName_DataBound">
                </asp:DropDownList></td>
            <td>
                <asp:Label ID="Label3" runat="server" Text="تاریخ ثبت از"></asp:Label></td>
            <td>
        <ajaxToolkit:MaskedEditExtender ID="meeStartDate" runat="server"
                            TargetControlID="txtFromAccountDate" 
                            Mask="9999/99/99"
                            MessageValidatorTip="true"
                            CultureName="fa-IR"
                            OnFocusCssClass="MaskedEditFocus"
                            OnInvalidCssClass="MaskedEditError"
                            MaskType="None"
                            AcceptNegative="Left" />
                       <asp:TextBox ID="txtFromAccountDate" style="direction:ltr; text-align:left" Width="100" runat="server" /></td>
            <td>
                تا</td>
            <td style="width: 3px">
                <ajaxToolkit:MaskedEditExtender ID="meeEndDate" runat="server" AcceptNegative="Left"
                    CultureName="fa-IR" Mask="9999/99/99" MaskType="None" MessageValidatorTip="true"
                    OnFocusCssClass="MaskedEditFocus" OnInvalidCssClass="MaskedEditError" TargetControlID="txtToAccountDate">
                </ajaxToolkit:MaskedEditExtender>
                <asp:TextBox ID="txtToAccountDate" runat="server" Style="direction: ltr; text-align: left"
                    Width="100"></asp:TextBox></td>
            <td>
                </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="Label4" runat="server" Text="نام فروشنده"></asp:Label></td>
            <td>
                <asp:DropDownList ID="ddlSalesPerson" runat="server" Width="194px" DataSourceID="sdsSalesPerson" DataTextField="FullName" DataValueField="ID" OnDataBound="ddlSalesPerson_DataBound">
                </asp:DropDownList></td>
            <td>
                <asp:Label ID="Label5" runat="server" Text="نوع"></asp:Label></td>
            <td>
                <asp:DropDownList ID="ddlType" runat="server" DataSourceID="sdsType" DataTextField="Description"
                    DataValueField="ID" Width="104px" OnDataBound="ddlType_DataBound">
                </asp:DropDownList></td>
            <td>
                <asp:Label ID="Label2" runat="server" Text="نام حساب"></asp:Label></td>
            <td style="width: 3px">
                <asp:DropDownList ID="ddlAccountName" runat="server" AppendDataBoundItems="True"
                    DataSourceID="sdsInternalAccounts" DataTextField="AccountName" DataValueField="ID"
                    Width="104px" OnDataBound="ddlAccountName_DataBound">
                </asp:DropDownList></td>
            <td>
                <asp:Button ID="btnSearch" runat="server" Text="جستجو" OnClick="btnSearch_Click"/></td>
        </tr>
    </table>
    <hr />
    &nbsp; &nbsp;
    <CR:CrystalReportViewer ID="crvInternalAccountPayment" runat="server" DisplayGroupTree="False" />
</asp:Content>